unit EditAccount;

interface

uses
  Winapi.Windows, Winapi.Messages, SysUtils, Variants, Classes, Graphics,
  Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses,
  uniGUIClasses, uniGUIForm, DB, DBClient, ClientRowSet, uniPanel, jpeg,
  uniImage, uniButton, uniBitBtn, uniMultiItem, uniComboBox, uniDBComboBox,
  uniLabel, uniGUIBaseClasses, uniEdit, uniDBEdit, uniMemo, uniDBMemo;

type
  TFrmEditAccount = class(TUniForm)
    edName: TUniDBEdit;
    UniLabel1: TUniLabel;
    cbType: TUniDBComboBox;
    UniLabel3: TUniLabel;
    edcompabb: TUniDBEdit;
    UniLabel6: TUniLabel;
    edAddress: TUniDBEdit;
    UniImage8: TUniImage;
    lbCaption: TUniLabel;
    UniPanel1: TUniPanel;
    UniPanel2: TUniPanel;
    UniLabel12: TUniLabel;
    dsAccount: TDataSource;
    btSave: TUniBitBtn;
    btClose: TUniBitBtn;
    UniLabel2: TUniLabel;
    edBankCardNo: TUniDBEdit;
    UniLabel4: TUniLabel;
    edContactor: TUniDBEdit;
    UniLabel5: TUniLabel;
    edTel: TUniDBEdit;
    UniLabel7: TUniLabel;
    edRemark: TUniDBMemo;
    cbBank: TUniDBComboBox;
    UniLabel8: TUniLabel;
    edComp: TUniDBEdit;
    procedure btSaveClick(Sender: TObject);
    procedure btCloseClick(Sender: TObject);
    procedure UniFormShow(Sender: TObject);
    procedure UniFormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure InitForm;
  end;

function FrmEditAccount: TFrmEditAccount;

implementation

{$R *.dfm}

uses
  MainModule, uniGUIApplication,accmodule,dictmodule, uCommFunction;

function FrmEditAccount: TFrmEditAccount;
begin
  Result := TFrmEditAccount(UniMainModule.GetFormInstance(TFrmEditAccount));
end;

procedure TFrmEditAccount.btCloseClick(Sender: TObject);
begin
  TClientRowset(dsAccount.DataSet).CancelUpdates;
  self.Close;
end;

procedure TFrmEditAccount.btSaveClick(Sender: TObject);
begin
  TClientRowset(dsAccount.DataSet).ApplyUpdates;
  self.Close;
end;

procedure TFrmEditAccount.InitForm;
begin

end;

procedure TFrmEditAccount.UniFormCreate(Sender: TObject);
begin
  SetCompoentLanguage(Self);
end;

procedure TFrmEditAccount.UniFormShow(Sender: TObject);
begin
  InitForm;
end;

end.
